package me.phelps.webrtctest;

/**
 * Created by User on 2016/11/4.
 */

public interface AudioConstants {

    int CHANNEL = 1;//声道数
    int SAMPLE_RATE = 16000;//采样率
    int BITS_PER_SAMPLE = 16;//每次采样比特数
    int BYTES_PER_FRAME = CHANNEL*BITS_PER_SAMPLE/8;//通道数*每次采样字节数
    int MS_IN_BUF = 10;//每个buff的时长ms
    int BUFFERS_PER_SECOND = 1000/MS_IN_BUF;//每秒的缓冲数
    int FRAMES_PER_BUF = SAMPLE_RATE/BUFFERS_PER_SECOND;//每个缓冲的字节数
    int BYTES_PER_BUF = SAMPLE_RATE/BUFFERS_PER_SECOND*BYTES_PER_FRAME;//每个缓冲的字节数

    String MIME = "audio/mp4a-latm";
    String ENCODING = "mp4a-latm";

}
